home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cenvid9.zip / REBOOT_2.BAT < prev    next >
DOS Batch File  |  1994-03-04  |  1KB  |  31 lines

  1. @echo off
  2. REM ****************************************************************
  3. REM *** Reboot_2.bat - Reboot computer by jumping to BIOS reboot ***
  4. REM *** ver.1          routine.  This is an example of the CEnvi ***
  5. REM ***                asm() function.  To provide protection    ***
  6. REM ***                from accidentaly rebooting, you must      ***
  7. REM ***                enter PLEASE as the first parameter.      ***
  8. REM ****************************************************************
  9.  
  10.  
  11. REM **************************************************************
  12. REM *** Check that "PLEASE" is the first parameter.  CEnvi     ***
  13. REM *** return errorlevel if it is not please.                 ***
  14. REM **************************************************************
  15. CEnvi return( strcmpi("%1","Please") ? 1 : 0 )
  16. if errorlevel 1 GOTO PLEASE
  17.  
  18. REM **************************************************************
  19. REM *** A routine for rebooting is in the BIOS at location     ***
  20. REM *** FFFF:0000.  To reboot, will use the CEnvi asm()        ***
  21. REM *** to execute the machine code: JMPF FFFF:0000, which in  ***
  22. REM *** machine code is the byte sequence EA 00 00 FF FF.      ***
  23. REM **************************************************************
  24. CEnvi poke(0x472,0x1234,UWORD16); asm('\xEA\x00\x00\xFF\xFF');
  25.  
  26. :CENVI_EXIT
  27.  
  28. :PLEASE
  29. ECHO Reboot_2.bat will reboot your computer.  To execute Reboot.bat you
  30. ECHO must enter: REBOOT_2 PLEASE
  31.